package com.ojoin.trade.supplyloan_core.web.service.impl;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.dao.BaseDao;
import com.ojoin.trade.common.web.service.impl.BaseServiceImpl;
import com.ojoin.trade.supplyloan_core.web.dao.TbSlProcessInfoDao;
import com.ojoin.trade.supplyloan_core.web.domain.TbSlProcessInfo;
import com.ojoin.trade.supplyloan_core.web.domain.TbSlProcessInfoVO;
import com.ojoin.trade.supplyloan_core.web.service.TbSlProcessInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 16-4-6
 * Time: 下午3:47
 * To change this template use File | Settings | File Templates.
 */
@Service
public class TbSlProcessInfoServiceImpl extends BaseServiceImpl<TbSlProcessInfo> implements TbSlProcessInfoService {

    @Autowired
    private TbSlProcessInfoDao dao;
    @Override
    protected BaseDao<TbSlProcessInfo> getBaseDao() {
        return dao;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public List<TbSlProcessInfoVO> queryNotTbSlProcessInfo() throws BusinessException {
        return ((TbSlProcessInfoDao)dao).queryNotTbSlProcessInfo();  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void updateTbSlProcessInfo(Map<String, Object> map) throws BusinessException {
        ((TbSlProcessInfoDao)dao).updateTbSlProcessInfo(map);
    }

    @Override
    public List<TbSlProcessInfoVO> queryTbSlProcessInfoVo(Pageable page,Integer joinid) throws BusinessException {
        return ((TbSlProcessInfoDao)dao).queryTbSlProcessInfoByJoinid(page,joinid);
    }

    @Override
    public void lockById(int id) throws BusinessException {
        ((TbSlProcessInfoDao)dao).lockById(id);
    }

    @Override
    public TbSlProcessInfoVO queryLoanInfoVoByProcess(Integer id) throws BusinessException {
        return((TbSlProcessInfoDao)dao).queryLoanInfoVoByProcess(id);
    }

    @Override
    public void cancelCredit() throws BusinessException {
        ((TbSlProcessInfoDao)dao).cancelCredit();
    }

    @Override
    public TbSlProcessInfoVO queryMobileByProcessid(Integer processinfo) throws BusinessException {
        return  ((TbSlProcessInfoDao)dao).queryMobileByProcessid(processinfo);
    }
}
